{extend name="common/base" }

{block name="style"}
<style type="text/css">

</style>
{/block}

{block name="content"}
<div class="am-g">
	<div class="am-u-sm-12">
		<form class="am-form ajax-form" method="post" action="{:module_url('add')}">

			{$widget->form('text', ['title' => '门店名称', 'name' => 'store_name', 'value' => ''])}

			<div class="am-g am-margin-top-sm">
				<div class="am-u-sm-4 am-u-md-2 am-text-right">所在地区</div>
				<div class="am-u-sm-8 am-u-md-7 am-u-end" id="citys">
					<select class="am-hide" data-am-selected="{btnSize: 'sm', maxHeight: 300}" name="province"></select>
                    <select class="am-hide" data-am-selected="{btnSize: 'sm', maxHeight: 300}" name="city"></select>
                    <select class="am-hide" data-am-selected="{btnSize: 'sm', maxHeight: 300}" name="area"></select>
				</div>
			</div>

			{$widget->form('text', ['title' => '门店地址', 'name' => 'address', 'value' => ''])}

			{$widget->form('text', ['title' => '门店电话', 'name' => 'tel', 'value' => ''])}

			{$widget->form('text', ['title' => '负责人姓名', 'name' => 'principal', 'value' => ''])}

			{$widget->form('text', ['title' => '负责人手机号', 'name' => 'principal_phone', 'value' => ''])}

			{$widget->form('text', ['title' => '绑定设备码UUID', 'name' => 'uuid', 'value' => ''])}

			{$widget->form('select', ['title' => '所属门店组', 'name' => 'group_id', 'value' => '', 'list' => $storeGroup ])}

			{$widget->form('radio', ['title' => '是否允许点播', 'name' => 'is_ondemand', 'value' => 1, 'list' => $isOndemand ])}

			{$widget->form('radio', ['title' => '门店状态', 'name' => 'status', 'value' => 1, 'list' => $storeStatus ])}

			{$widget->form('text', ['title' => '排序', 'name' => 'sort', 'value' => '0'])}

			{$widget->form('textarea', ['title' => '备注信息', 'name' => 'remarks', 'value' => ''])}

			{$widget->form('submit', ['title' => '用户操作'])}

		</form>
	</div>
</div>
{/block}

{block name="script"}

<script type="text/javascript">
	$(function(){
		
		require(['jquery', 'jquery-citys'], function(){
			$('#citys').citys({
				dataUrl: CMS.path.lib + '/jquery.citys/list.json',
				valueType:'name',
				required: false
			});
		});

		
	});
</script>
{/block}